<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */


/**
 * Smarty currency format plugin
 *
 * Type:     modifier<br>
 * Name:     currency<br>
 * @param string
 * @return string
 */
function smarty_modifier_currency($string, $separator='.', $spacer='')
{     
    if(is_numeric($string)){
        return number_format($string, 2, $separator, $spacer);
    }
    
    return $string;
}

